//

var stategies = {
    'S':function (salary) {
        return salary*4;
    },
    'A':function (salary) {
        return salary*3;
    },
    'B':function (salary) {
        return salary*2;
    }
};


var calculateBonus = function (level, salary) {
    return stategies[level](salary);
};

console.log(calculateBonus('S',20000));
console.log(calculateBonus('A',10000));

